package com.zzy.demo.web;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
 * 
 * @author guokaige
 *
 */
@Controller
@RequestMapping("/session")
public class SessionController {

	@RequestMapping("/invalid")
	public void sessionInvalid(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
		request.setAttribute("errorMsg", "session超时!!!");
		request.getRequestDispatcher("/login").forward(request, response);
	}

	
	
	
}
